<!doctype html>
<html>
<head>
	<script>

		function find() {
		    var password=document.getElementById("password").value;


		    var s=document.getElementById("name").value;
		    var atr=localStorage.getItem(s);
		    if(atr==null){
		        alert("提示\n\n用户名不存在");
		        return false;
			}
			else {
                for (var i = 0; i < localStorage.length; i++) {
                    var sitename = localStorage.key(i);
                    var str = localStorage.getItem(sitename);

                    if (typeof str === 'string') {
                        var site = JSON.parse(str)
                    }

                    if (atr == str) {
                        break;
                    }


                }
                if (password !=site.password){
                    alert("提示\n\n密码错误");
                    return false;
                }





                sessionStorage.username = s;
                window.location.href = 'http://wasd897586363.gitee.io/dengluchenggong';
            }


        }
	</script>
<meta charset="utf-8">
<title>登录</title>

<style type="text/css">
<!--body {
	
	background-image: url(风流背景.jpg);
	background-repeat: no-repeat;
	text-align: center;
	background-position: center;
}a:link {
	text-decoration: none;
	color: #000000;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
	</style>
</head>

<body><form name="form1" onsubmit="find()">
<h1>登录</h1><br><br><br><br>
<h2>用户名</h2>
<input type="text" id="name">
<h2>密码</h2>
<input type="password" id="password"><br><br><br><br><br><br><br>
<img  onclick="find()" src="登录2.jpg" width="151" height="90" alt=""/>
	<a href="http://wasd897586363.gitee.io/zhuce"><h3>注册</h3></a></form>
<br><br><br><br><br><br>
<footer>Welcome to 风流 ...</footer>
</body>
</html>
